package com.baboba.rummy.web.client.card;

import com.baboba.rummy.cards.Card;
import com.baboba.rummy.cards.ColorCard;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;

public class CardView extends Composite {
	
	public CardView(Card card){
		Label label = new Label();
		label.setText(String.valueOf(card.getNumber()));
		label.setStylePrimaryName("card");
		
		if (card instanceof ColorCard)
		label.addStyleName("card_"+ ((ColorCard)card).getColor());
		
		this.initWidget(label);
	}
	
}
